﻿using Consul;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Nlog.RabbitMQ.Target;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ebusiness_Framework.ResourcesMonitoring
{
    public static class ResourcesMoniterServiceCollectionExtentions
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="services"></param>
        /// <returns></returns>
        public static IServiceCollection AddResourcesMoniter(this IServiceCollection services, IConfiguration configuration)
        {
            services.AddTransient<ResourcesMoniters>();
            services.Configure<ResourcesMoniterOptions>(configuration.GetSection("ResourcesMoniters")); 
            return services;
        }
    }
}
